import order from '../admin/Order'

const copyObj = (obj = {}) => {
  let newObj = null
  // 判断是否需要继续进行递归
  if (typeof obj === 'object' && obj !== null) {
    newObj = obj instanceof Array ? [] : {}
    // 进行下一层递归克隆
    for (var i in obj) {
      newObj[i] = copyObj(obj[i])
    }
  } else {
    newObj = obj
  }
  return newObj
}
const FinanceOrder = {
  FinanceOrder: copyObj(order).Order
}

// g模式下copy的config不能改变前端，需要修改相应view的list与form
// FinanceOrder.FinanceOrder.entity = { name: 'Order', prefix: `manage` }
// FinanceOrder.FinanceOrder.list.actions = []
// FinanceOrder.FinanceOrder.list.disabled_actions = ['new', 'lines', 'export']
export default FinanceOrder
